export const setStorage=(key:string,value:any)=>{
    if(typeof value=="string"){
        localStorage.setItem(key,value)
    }else{
        localStorage.setItem(key,JSON.stringify(value))
    }
}
export const removeStorage=(key:string)=>{
    localStorage.removeItem(key)
}

export const getStorage=(key:string)=>{
  try{
    return JSON.parse(localStorage.getItem(key)!)
  }catch(err){  
    return localStorage.getItem(key)
  }
}